import request from '@/utils/request.js'
//课程列表查询
export const lessonListService = (params) =>{
    return request.get('/admin/lesson/page',{params:params})
} 
//添加课程
export const addLessonService = (lessonForm)=>{
    lessonForm.begin = lessonForm.begin.replace('T',' ')
    return request.post('/admin/lesson',lessonForm)
}
//修改课程
export const updateLessonService = (lessonForm)=>{
    lessonForm.begin = lessonForm.begin.replace('T',' ')
    return request.put('/admin/lesson',lessonForm)
}
//删除课程
export const deleteLessonService = (id)=>{
    return request.delete('/admin/lesson/'+id)
}
export const showDetailsService = (id) =>{
    return request.get('/admin/lesson/'+id)
}